nums2 = 7385137888721
nums1 = 10470245
left = 1
right = int(1e20)
ans = right


def check(n):
    after_2 = n ** 2 - nums2 * 4
    if after_2 < 0:
        return True
    return after_2 < nums1


while left < right:
    mid = (left + right) // 2
    if check(mid):
        ans = mid
        left = mid + 1
    else:
        right = mid - 1
print(ans)
